<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第23题</title>
    <script>
         // 用户输入
         var a = parseInt(prompt("请输入一个数字"));
         // 列举约数
         for (var i = 1; i <= a; i++) {
             if (a % i == 0) {
                 console.log(i + "是" + a + "的一个约数");
             }
         }
    </script>
</head>
<body>
    
</body>
</html>